package com.agp.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 古树健康记录传输对象（2025年增强版）
 * 包含问题闭环管理和多图上传功能 
 * @since 2025-05-22 
 */
@Data
@Builder
@AllArgsConstructor

public class TreeHealthRecordDTO {

    @NotNull(message = "古树ID不能为空")
    @Positive(message = "古树ID必须为正整数")
    private Integer treeId;
 
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkDate;
 
    @NotNull(message = "健康状态不能为空")
    private Integer healthStatus;

    //  是否处理完成
    private Integer isResolved ;
 
    @NotBlank(message = "异常描述在非健康状态下必填")
    private String unhealthyDescription;

    @Size(max = 9, message = "最多上传9张照片")
    private List<@URL(message = "图片URL格式无效") String> photoUrls;
 



}